<ui:composition template="/templates/layout.xhtml"
     xmlns="http://www.w3.org/1999/xhtml"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:p="http://primefaces.org/ui"        
     xmlns:c="http://java.sun.com/jsp/jstl/core">
     <ui:define name="content">       
        <h:form>             
             Votre panier est vide
             <c:if test="#{commandeController.getSelected().statut == null}">
                
                <p:dataTable var="car" value="#{panierController.carsSmall}" >  
                <p:column headerText="Produit">  
                   <h:outputText value="#{car.produit}" />  
                </p:column>  
  
                <p:column headerText="Description">  
                <h:outputText value="#{car.description}" />  
                </p:column>  
  
                <p:column headerText="Réf.">  
                <h:outputText value="#{car.ref}" />  
                </p:column>  
  
                <p:column headerText="Dispo.">  
                <h:outputText value="#{car.dispo}" />  
                </p:column> 
                    <p:column headerText="Prix unitaire">  
                <h:outputText value="#{car.unitaire}" />  
                </p:column> 
                    <p:column headerText="Qté">  
                <h:outputText value="#{car.quant}" />  
                </p:column> 
                <p:column headerText="Total">  
                <h:outputText value="#{car.tt}" />  
                </p:column> 
                <p:column headerText="Confirmation"> 
                <p:commandButton id="showDialogButton" value="acheter" onclick="confirmation.show();" type="submit"/>     
                <p:confirmDialog id="confirmDialog" message="vouler vous vraiment confirmer votre achat?" header="Confiramation de l'achat"  widgetVar="confirmation">  
                <h:outputLabel value="Date de livraison" for="dateLivraison" />
                <p:calendar  value="#{commandeController.selected.dateLivraison}" id="dateLivraison" showButtonPanel="true" required="true" requiredMessage="Please enter date!"/>             
                <p:commandButton id="confirm" value="Confirmer"   actionListener="#{commandeController.create()}" />  
                <p:commandButton id="decline" value="Not Yet" onclick="confirmation.hide();" type="button" />   
                </p:confirmDialog>  
                <!--<p:commandButton  action="" value="Confirmer" type="submit" icon="ui-icon-check" />--> 
                </p:column>     
                </p:dataTable>                                   
                
                </c:if>
        </h:form>   
     </ui:define>
</ui:composition>
